package com.example;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: bjc
 * Date: 2025-07-02
 * Time: 21:09
 */
@RestController
@RequestMapping("/yml")
public class YmlController {
    @Value("${lesson}")
    private String lesson;
    @Value("${enterprise.subject[0]}")
    private String subject_00;
    @Value("${enterprise.subject[1]}")
    private String subject_01;

    @GetMapping("/{id}")
    public String getById(@PathVariable Integer id){
        System.out.println(lesson);
        System.out.println(subject_00);
        System.out.println(subject_01);
        return "hello , spring boot!";
    }
}
